part of '../../repository.dart';

const _kWebOneTimePurchasedItemTransactionRegularOfferTypeValue = 'regular';

class _WebOneTimePurchasedItemTransactionOfferTypeDto extends Equatable {
  const _WebOneTimePurchasedItemTransactionOfferTypeDto._internal({
    required this.offerTypeString,
  });

  final String offerTypeString;

  @override
  List<Object?> get props {
    return [
      offerTypeString,
    ];
  }

  factory _WebOneTimePurchasedItemTransactionOfferTypeDto.fromString(String offerTypeString) {
    return _WebOneTimePurchasedItemTransactionOfferTypeDto._internal(
      offerTypeString: offerTypeString,
    );
  }

  WebOneTimePurchasedItemTransactionOfferType toEntity() {
    return switch (offerTypeString) {
      _kWebOneTimePurchasedItemTransactionRegularOfferTypeValue =>
        WebOneTimePurchasedItemTransactionOfferType.regular,
      _ => throw UnimplementedError(),
    };
  }
}
